const { mongoose } = require("./db");
const Schema = mongoose.Schema;


const addresSchema = new Schema({
  name: {
    type: String,
    default: "",
  }, //姓名
  phone: {
    type: String,
    default: "",
  }, //手机号
  fuzzyaddress: {
    type: String,
    default: "",
  }, //模糊地址
  sitename: {
    type: String,
    default: "",
  }, //地址名称
  detailedaddress: {
    type: String,
    default: "",
  }, //楼层门牌号
  latitude: {
    type: String,
    default: "",
  }, //经度
  longitude: {
    type: String,
    default: "",
  }, //纬度
  uid: {
    type: mongoose.Types.ObjectId,
    ref: "wxuser",
  },
});

const addressModel = mongoose.model("address", addresSchema);

module.exports = { addressModel };
